export default {
	data() {
		return {
			visible: false,
			confirmLoading: false,
			form: {},
			mod: undefined
		}
	},
	computed: {
		modText() {
			return this.mod === 'edit' ? '编辑' : '创建'
		}
	},
	methods: {
		action(data, mod) {
			this.confirmLoading = false
			this.form = this.$utils.deepCopy(data);
			this.visible = true;
			this.mod = mod
		}
	}
}